extends base

block vars
  - var title = 'Create an Account'
  - var description = 'Create a new account.'
  - var bodytag = 'register'

block body

  .container.custom-container
    .va-wrapper
      .view.registration-view.container
        if organization
          .header.text-center #{organization.name}
        .box.row
          .col-sm-12
            .header
              span Create Account

            if errors
              .alert.alert-danger
                each error in errors
                  p #{error.message}

            form.registration-form.form-horizontal.sp-form(method='post', role='form')
              each field in formModel.fields
                div(form-group='true', class='form-group group-#{field.name}')
                  label.col-sm-4 #{field.label}
                  .col-sm-8
                    - var value = form ? form[field.name] : '';
                    input.form-control(placeholder=field.placeholder, name=field.name, value=value, required=field.required, type=field.type)

              button.btn.btn-register.btn-sp-green(type='submit') Create Account

        a.to-login(href=stormpathConfig.web.login.uri) Back to Log In
